Day 01
Carleton College
Stat 220 - Spring 2026

To get to know you all better, you will make a dataset about yourselves to share with the class. You have 30 minutes to do so. You should hit on the following buckets:
# A tibble: 10 × 3
fun class_year northfield_food
<chr> <chr> <chr>
1 I love to go out to eat at new restaurants with m… Sophomore Quarterback!
2 I like running, art/crafts, playing guitar, and l… Junior <NA>
3 Mostly finance stuff 9reading blogs/watching vide… Junior Red barn
4 Exercise! Junior Burton Dining …
5 <NA> Junior the co-op
6 drawing Junior New Buffet
7 I used to skateboard a lot as a kid, although I s… Senior Hogan Brothers.
8 Cook lots of spicy food Sophomore Desi Diner
9 I play video games, read, and watch movies and sh… Junior Desi Diner
10 Volleyball, read, pickleball, weightlifting. Senior Any of the foo…
You took a survey

Google saved your responses in a sheet

I read your data into R, cleaned it, and saved it as a CSV

What class year are you?
survey |>
count(class_year) |>
mutate(prop = n/sum(n)) |>
ggplot(aes(y = class_year, x = prop, fill = class_year)) +
geom_col(show.legend = FALSE) +
scale_x_continuous(labels = percent_format(accuracy = 1), breaks = c(0, .1, .2, .3, .4, .5)) +
labs(
title = "Class year among Stat220 Students",
y = "",
x = "Proportion",
caption = "Self-reported data collected from Stat220 students by 8pm on March 29"
) +
scale_fill_viridis_d(end = .75, option = "plasma")
Where can you find the best food in Northfield?
survey |>
count(northfield_food) |>
mutate(prop = n/sum(n)) |>
ggplot(aes(y = northfield_food, x = prop, fill = northfield_food)) +
geom_col(show.legend = FALSE) +
scale_x_continuous(labels = percent_format(accuracy = 1), breaks = c(0, .1, .2, .3, .4, .5)) +
labs(
title = "Where can you find the best food in Northfield?",
y = "",
x = "Proportion",
caption = "Self-reported data collected from Stat220 students by 10am on Jan 5"
) +
scale_fill_viridis_d(end = .75, option = "plasma")
library(wordcloud)
library(tm)
library(NatParksPalettes)
word.corpus<-VCorpus(VectorSource(survey$fun)) #Corpus
word.corpus<-word.corpus%>%
tm_map(removePunctuation)%>% ##eliminate punctuation
tm_map(removeNumbers)%>% #no numbers
tm_map(stripWhitespace)#white spaces
word.corpus <- tm_map(word.corpus, removeWords, c("the", "and","for","this","that","with","will","also","i'm"))
word.corpus<-tm_map(word.corpus, stemDocument)
word.counts<-as.matrix(TermDocumentMatrix(word.corpus))
word.freq<-sort(rowSums(word.counts), decreasing=TRUE)
#head(word.freq)##what are the top words?
wordcloud(words=names(word.freq), freq=word.freq, scale=c(3,.5),max.words = 100, random.order = TRUE,
min.freq = 1, color=natparks.pals("Torres"))

It’s easy when you start out programming to get really frustrated and think, “Oh it’s me, I’m really stupid,” or, “I’m not made out to program.” But, that is absolutely not the case. Everyone gets frustrated. I still get frustrated occasionally when writing R code. It’s just a natural part of programming. So, it happens to everyone and gets less and less over time. Don’t blame yourself. Just take a break, do something fun, and then come back and try again later.
Heavily encouraging you to have your own local R and RStudio
You may have to install packages as we go - use install.packages function
You may have used Maize in the past
Okay to use that for today, but work on downloading R and RStudio
Read the full syllabus by next class - on course website
| Day | Time | Type | Location |
|---|---|---|---|
| Monday | 2-3 | Drop-in | CMC 225 |
| Tuesday | 10:30-11:30 | Appt | CMC 225 |
| Wednesday | 11:30-12:30 | Drop-in | CMC 225 |
| Friday | 12-1 | Drop-in | CMC 225 |
Homework and will be graded as successful, half credit, or not successful. Projects will be graded as excellent, successful, or not successful.
To earn a course grade, you must meet all of the requirements in a given row:
| Homework Problems | Portfolio Projects (4 total) | Final Project | |
|---|---|---|---|
| A | 85% | 2 Excellent + 2 Successful | Excellent |
| B | 75% | 4 Successful | Successful |
| C | 65% | 3 Successful | Successful |
| D | 50% | 2 Successful | Successful |
“+” and “-” grades are determined by partially meeting the requirements in a given row.
Note: I expect daily attendance and participation. Missing >5 class meetings or consistent issues with being on-task will result in a 1/3 grade deduction.
You get 3 tokens. You can use a token to:
https://github.com/stat220kurtz
GitHub organization for the course
All of your work and your membership (enrollment) in the organization is private
Each assignment is a private repo on GitHub, I distribute the assignments on GitHub.
You will work on your assignment, then “render ➡️ commit ✅ push ⤴️”
You’ll then be able to submit your PDF via gradescope
Fill out the Welcome Survey for collection of your account names, later this week you will be invited to the course organization.
Create a GitHub account if you don’t have one
Complete the welcome survey if you haven’t already
Read the syllabus
Download or update your local R/RStudio versions
Complete the readings for next class
Download GitHub Desktop